/*var app = angular.module('myApp', []);*/

app.config(['$provide',function($provide) {
    $provide.factory('getUserAccountService',['$http',function ($http) {

        var user = {};//定义一个Object对象'

        var account;//定义一个私有化的变量
        //对私有属性写getter和setter方法
        user.setAccount = function (newAccount) {
            account = newAccount;
        };
        user.getAccount = function () {
            return account;
        };
        
        user.setPassword = function (newPassword) {
            password= newPassword;
        };
        user.getPassword = function () {
            return password;
        };
        
        user.setImage = function(newImagepath){
        	 image = newImagepath;
        };
         user.getImage = function(){
        	return image;
        };
         
        user.setGender=function(newGender){
        	gender=newGender
        };
        user.getGender=function(){
        	return gender;
        };
        
        user.setAge=function(newAge){
        	age=newAge
        };
        user.getage=function(){
        	return age;
        };
        
         user.setnickname=function(newNickname){
        	nickname=newNickname
        };
        user.getnickname=function(){
        	return nickname;
        };
        
         user.setnickname=function(newNickname){
        	nickname=newNickname
        };
        user.getnickname=function(){
        	return nickname;
        };
        
         user.setPhone=function(newPhone){
        	phone=newPhone
        };
        user.getphone=function(){
        	return phone;
        };
         user.setnicUnderwrite=function(newUnderwrite){
        underwrite=newUnderwrite
        };
        user.getunderwrite=function(){
        	return underwrite;
        };
        user.setAddres=function(newAddres){
        addres=newAddres
        };
        user.getAddres=function(){
        	return addres;
        };
/*用户活动数量*/
        user.setUserActivityNum=function(newuserActivitynum){
            userActivityNum=newuserActivitynum;
        }
        user.getUserActivitynum=function(){
            return userActivityNum;
        }
        /*用户帖子数量*/
        user.setUserForumNum=function(newuserForumnum){
            userForumNum=newuserForumnum;
        }
        user.getUserForumnum=function(){
            return userForumNum;
        }
/*用户收藏数量*/
        user.setUserCollectNum=function(newuserCollectnum){
            userCollectNum=newuserCollectnum;
        }
        user.getUserCollectnum=function(){
            return userCollectNum;
        }
        return user;//返回这个Object对象



    }]);
}]);
